<?php
  function __realpath($path) {
        $path = str_replace('\\','/',realpath($path));
        if ($path{1} == ':') {
            // We can't just check for C:/, because windows users may have the IIS webroot on X: or F:, etc.
            $path = substr($path,2);
        }
        return $path;
    }
    function writelog_file($type,$dir='')
    {
        global $not_found,$total;
        $log='';
        if($type!=1)
        {
        $not_found++;
        $log.='--'.$dir.'<br>';
        }
        else
        {
           $log.='<strike>--'.$dir.'</strike><br>';
        }
        $total++;
        return $log;
    }
    function exponent_unhtmlentities( $str )
    {
        $trans = get_html_translation_table(HTML_ENTITIES);
        $trans['&apos;'] = '\'';
        $trans=array_flip($trans);

        $trans['&apos;'] = '\'';
        $trans['&#039;'] = '\'';
        return strtr($str, $trans);
    }
?>
